import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Test_1 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        Map<Character, Integer> map=new HashMap<>();
        System.out.println("请输入一个字符串：");
        String str=input.next();
        char[] cr=str.toCharArray();
        for (char c:cr){
            Integer i=map.get(c);
            if (i == null){
                map.put(c,1);
            }else {
                map.put(c,i+1);
            }
        }
        System.out.println(map);
    }
}
